package cn.hy.service;

import cn.hutool.core.bean.BeanUtil;
import cn.hy.entity.Goods;
import cn.hy.entity.SecKillGoods;
import cn.hy.mapper.SecKillGoodsMapper;
import cn.hy.vo.GoodsVo;
import cn.hy.vo.SecKillGoodsVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SecKillGoodsServiceImpl implements SecKillGoodsService{

    @Resource
    SecKillGoodsMapper secKillGoodsMapper;

    @Override
    public List<SecKillGoodsVo> list() {
        List<SecKillGoods> secKillGoods = secKillGoodsMapper.selectByExample(null);
        return BeanUtil.copyToList(secKillGoods, SecKillGoodsVo.class);
    }
}
